<%= form_for(@staff) do |f| %>
  <% if @staff.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@staff.errors.count, "error") %> prohibited this staff from being saved:</h2>

      <ul>
      <% @staff.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <% f.label :staff_role_id %>Peranan Staff<br>
    <%= f.collection_select(:staff_role_id, StaffRole.all, :id, :label, prompt: true) %>
    <%= link_to 'New Role', new_staff_role_path %>
  </div>
  <div class="field">
    <% f.label :first_name %>Nama Depan<br>
    <%= f.text_field :first_name %>
  </div>
  <div class="field">
    <% f.label :last_name %>Nama Belakang<br>
    <%= f.text_field :last_name %>
  </div>
  <div class="field">
    Tanggal Kelahiran (Tahun/Bulan/Tanggal)<br>
    <%= f.date_select :dob %>
  </div>
  <div class="field">
    <% f.label :active %>Status<br>
    <%= f.check_box :active %>
  </div>
  <div class="actions">
    <%= f.submit "Masukkan" %>
  </div>
<% end %>
